;(subroutine) Place text at points.
(defun pttxt (source prfix istart istop / count thite ptindx)
  (SETQ thite (*(getvar"dimscale")0.06))
  (IF (AND tangl (EQ (TYPE tangl) 'REAL))
    NIL
    (SETQ tangl 0.0)
  )
  (IF pttxt_ss NIL (SETQ pttxt_ss (SSADD)))
  (if
    (and istart istop)
    (progn
      (setq ptindx (- istop istart)
            count 0
      )
      (while (not(eq count ptindx))
        (if
          (and
            (eval(read(strcat prfix (itoa istart))))
            (strcat source prfix (itoa istart))
          )
          (entmake
            (list
              (cons 0 "TEXT")
              (cons 8 "PTTXT_$TE$")
              (cons 10 (trans (eval(read(strcat prfix (itoa istart)))) 1 0))
              (cons 40 thite)
              (cons 50 tangl)
              (cons 62 (IF (WCMATCH source "SET_PT*") (IF (AND ptcnt (< ptcnt 256)) ptcnt 1) 256))
              (cons 1 (strcat source prfix (itoa istart)))
            )
          )
        );if
;        (command ".text" (eval(read(strcat prfix (itoa istart)))) "" "0" (strcat source prfix (itoa istart)))
        (setq istart (1+ istart)
              ptindx (1- ptindx)
              tangl (+ tangl (*(/ 5.0 180.0)PI))
        )
        (SETQ pttxt_ss (SSADD (entlast) pttxt_ss))
      )
    );progn
      (if
        (and
          (eval(read prfix))
          (strcat source prfix)
        )
        (progn
          (entmake
            (list
              (cons 0 "TEXT")
              (cons 8 "PTTXT_$TE$")
              (cons 10 (trans (eval(read prfix)) 1 0))
              (cons 40 thite)
              (cons 50 tangl)
              (cons 62 (IF (WCMATCH source "SET_PT*") (IF (AND ptcnt (< ptcnt 256)) ptcnt 1) 256))
              (cons 1 (strcat source prfix))
            )
          )
          (SETQ tangl (+ tangl (*(/ 5.0 180.0)PI)))
          (SETQ pttxt_ss (SSADD (entlast) pttxt_ss))
        )
      );if
  );if
  (setq istart nil istop nil)
  (princ)
)
;;;****************************************************************************
(DEFUN C:delpttxt ()
  (SETQ pttxt_ss2 (SSGET "X" '((8 . "PTTXT_$TE$"))))
  (COMMAND ".erase" pttxt_ss2 "")
  (C:TSNAP)
  (PRINC)
)